<?php
	if (!isset($_GET['id']) || empty($_GET['id']))
		// nėra id
		header('Location: index.php');

include_once "config/config.php";
include_once "functions/genericfunctions.php";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
            <title>SQL mokomasis puslapis</title>
            <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
            <link type="text/css" rel="stylesheet" media="all" href="css/styles.css" />
            <script src="scripts/modernizr-2.0.4.js"></script>


    </head>
    <body>
        <div id="page-wrapper">
            <div id="page">
                <?php include('header.html'); ?>
                <div class="content">
                    <div class="left-side">
                        <?php include('menu-left.html'); ?>
                    </div>
                    <div class="right-side">
                    	<form action="saveText.php" method="POST">
                    		<textarea name="text" id="text" class="ckeditor">
                    			<?php print(getTexts($_GET['id'], $workDB)); ?>
                    		</textarea>
                    		<input type="hidden" name="id" value="<?php print $_GET['id'] ?>" />
                    		<input type="submit" value="Užsaugoti" id="save" />
                    	</form>
                    </div>
                    
                </div>
                <div class="footer"><span>Kaunas, 2012 m.</span></div>
            </div>
        </div>
        <input type="hidden" id="hid" />

        <script src="http://code.jquery.com/jquery-latest.js"></script>

        <script type="text/javascript" src="scripts/ckeditor/ckeditor.js"></script> 	
    
    </body>
</html>